import sys

from PySide2.QtWidgets import QApplication

from FakerDevice.fakerFPGA.WaveInterface import *
from FakerDevice.fakerFPGA.digi_variable import PinType
from FakerDevice.fakerFPGA.fakerWave.output_wave import FakeUnitOutWave
from FakerDevice.fakerFPGA.ui_component.chart_wvt_plot import WvtChart


class TestBaseClock(BaseClock):

    def test_max_unit_timing(self):
        print(BaseClock.MAX_UNIT_TIMING)
        print(divmod(BaseClock.MAX_UNIT_TIMING, s))


class TestLWaveInterface:

    def test_some(self):
        pass

    def test_output1(self):
        app = QApplication.instance()
        if app is None:
            app = QApplication(sys.argv)
        win = WvtChart()
        win.d.df = FakeUnitOutWave.getDf(FakeUnitOutWave.dataOutC1)
        win.d.PinList = FakeUnitOutWave.getPinConfig()
        win.show()
        win.dataPreAnalysis()
        win.plot()
        win.wPlot()
        win.lPlot()
        app.exec_()
